<?php
// +----------------------------------------------------------------------
// | 订单首页
// +----------------------------------------------------------------------
// | Copyright (c) 2015
// +----------------------------------------------------------------------
// | Author: baiping 125618036@qq.com http://www.webipcode.com
// +----------------------------------------------------------------------
// |2016-1-15 上午11:55:43
// +----------------------------------------------------------------------
?>

<?php $this->load->view('public/header');?>
<?php $this->load->view('public/head');?>
<link href="<?php echo __STATIC__?>jsshow/css/bootstrap-modal-bs3patch.css" rel="stylesheet" />
<link href="<?php echo __STATIC__?>jsshow/css/bootstrap-modal.css" rel="stylesheet" />
<div class="container-fluid">
	<div class="row">
		<?php $this->load->view('public/sideleft');?>
		<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main ">
			<!-- 内容区 -->
			<div class="main-title">
				<h3>
					<?php echo $meta_title; ?>
				</h3>
			</div>
			<div class="con">
				<div class="cf">
					<div class="pull-left">
						<?php $this->load->view('order/menu');?>
					</div>
					<div class="pull-right search-form">
					<!-- 
					<form action="<?php //echo site_url('order/trademark')?>" method="post" name="search_form">
						<input class="search-input" type="text" placeholder="请输入搜索标题" name="search_name"> 
						<button type="submit" name="sub" class="btn btn-primary"><i class="glyphicon glyphicon-search"></i></button>
					</form>
					 -->	
					</div>
				</div>
				<div class="clearfix"></div>
				<!-- 内容列表 -->
				<?php if ( $record_count > 0 ){?>
				<table class="table table-striped table-hover ">
					<thead>
						<tr>
							<th class="row-selected"><input class="checkbox check-all" type="checkbox"></th>
							<th>订单号</th>
							<th>标题</th>
							<th>服务费</th>
							<th>官费</th>
							<th>总价</th>
							<th>下单时间</th>
							<th>操作</th>
						</tr>
					</thead>
					<?php foreach($list as $key => $val){?>
					<tr>
						<td><input class="ids row-selected" type="checkbox" value="<?php echo $val->id; ?>" name="id[]"></td>
						<td><?php echo $val->order_id;?></td>
						<td><small><?php echo $val->title;?></small></td>
						<td>
							<span class="label label-primary">￥<?php echo $val->service_price;?>元</span>
						</td>
						<td>
							<?php 
							if ( !empty( $val->officer_type ) ){
							?>
							<!-- 获取价格 -->
								<span class="label label-primary">￥<?php echo $val->officer_price;?>.00 元</span>
							<?php 
							}else{
								echo '--';	
							}	
							?>
						</td>
						<td>
							￥<?php echo $val->service_price+$val->officer_price ?>.00元
						</td>
						<td><?php echo time_format($val->ontime);?></td>
						<td>
							<a href="javascript:void(0);" class="popover1" data-id="<?php echo $val->id;?>" data-url="<?php echo site_url('order/getTrademarkContacts')?>">查看联系人</a>
							<?php if( $val->status == 0){?>
								<span class="label label-primary">等待联系</span>
							<?php }elseif($val->status == 1){?>
								<span class="label label-info">已联系</span>	
							<?php }elseif($val->status == 2){?>
								<span class="label label-warning">已关闭</span>
							<?php }elseif($val->status == 3){?>
								<span class="label label-success">已完成</span>	
							<?php }?>
							<?php if( in_array($val->status, array(0,1)) ){?>
							<small><a href="javascript:void(0);" onclick="onShowBootstrap('设置商标订单状态', '<?php echo site_url('order/settrademarkorderstatus/'.$val->id)?>', 500)">设置状态</a></small><A></A>
							<?php }?>
						</td>
					</tr>
					<?php }?>
					<tr>
						<td colspan="8">
							<ul class="pagination">
								<?php echo $pages;?>
								<li><span>共<?php echo $record_count?>条记录</span></li>
							</ul>
						</td>
					</tr>
				</table>
				<?php }else{?>
				<div class="alert alert-warning" role="alert">哦亲！暂无数据</div>
				<?php }?>	
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
//左侧菜单高亮显示
highlight_subnav( '<?php echo site_url('order/trademark')?>' );
</script>
<?php $this->load->view('public/footer');?>
<script type="text/javascript" src="<?php echo __STATIC__?>jsshow/js/bootstrap-modalmanager.js"></script><!--bootstrap动态弹出模拟层-->
<script type="text/javascript" src="<?php echo __STATIC__?>jsshow/js/bootstrap-modal.js"></script><!--模拟对话框-->
<script type="text/javascript" src="<?php echo __STATIC__?>jsshow/js/modal.manager.plugin1.0.js"></script>
<script type="text/javascript" src="<?php echo __STATIC__?>jsshow/js/jshow.utils.js"></script><!--bootstrap弹出层类-->
<script type="text/javascript" src="<?php echo __STATIC__?>js/bootstrap_show.js"></script>